package com.mg.service;

import com.github.pagehelper.PageInfo;
import com.mg.dto.ContractDto;
import com.mg.dto.SimpleResult;
import com.mg.model.Contract;
import com.mg.model.MachineType;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * Created by mg1213 on 2018/3/18.
 */
public interface ContractService {
    List<MachineType> getAllMachineTypes();

    PageInfo<ContractDto> selectPageInfo(ContractDto contractDto, int start, int limit);

    SimpleResult insertContract(Contract contract);
    SimpleResult updateContract(Contract contract);
    SimpleResult deleteContract(String ids);
    
    PageInfo<Map<String,Object>> findContractPage(Map<String,Object> paramMap, int start, int limit);

    SimpleResult buyContract(Integer userId, BigDecimal num, Integer contractId);
}
